package com.tdx.blog_nowcoder.entity;

import java.util.HashMap;
import java.util.Map;

/**
* @description: TODO
* @author tdx
* @date 2022/7/5 22:15
* @version 1.0
*/
public class MyEvent {
    private String topic;
    private int userId;
    private int entityType;

    private int entityId;
    private int entityUserId;
    private Map<String, Object> data = new HashMap<>();

    public String getTopic() {
        return topic;
    }

    public MyEvent setTopic(String topic) {
        this.topic = topic;
        return this;
    }

    public int getUserId() {
        return userId;
    }

    public MyEvent setUserId(int userId) {
        this.userId = userId;
        return this;
    }

    public int getEntityType() {
        return entityType;
    }

    public MyEvent setEntityType(int entityType) {
        this.entityType = entityType;
        return this;
    }

    public int getEntityId() {
        return entityId;
    }

    public MyEvent setEntityId(int entityId) {
        this.entityId = entityId;
        return this;
    }

    public int getEntityUserId() {
        return entityUserId;
    }

    public MyEvent setEntityUserId(int entityUserId) {
        this.entityUserId = entityUserId;
        return this;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public MyEvent setData(String key,Object value) {
        this.data = data;
        data.put(key,value);
        return this;
    }


}
